﻿using System.Collections.Generic;

namespace NH.OpenClosedPrinciple.FirstAttempt
{
	public class ProductFilter
	{
		public IEnumerable<Product> ByColor(IList<Product> products, ProductColour productColour) {
			foreach (var product in products) {
				if (product.Colour == productColour)
					yield return product;
			}
		}
	}
}